import antfu from '@antfu/eslint-config'

export default antfu({
  // TypeScript and Vue are auto-detected, you can also explicitly enable them:
  typescript: true,

  languageOptions: {
    globals: {
      process: true,
    },
  },
  rules: {
    'semi': [2, 'never'],
    'semi-spacing': [
      2,
      {
        before: false,
        after: true,
      },
    ],
    'no-console': 0,
    'antfu/if-newline': 'off',
    'eqeqeq': [2, 'always'],
    'no-var': 1,
    'no-const-assign': 2,
    'no-undef': 2,
    'no-undef-init': 0,
    'no-unsafe-finally': 2,
    'accessor-pairs': 2,
    'arrow-spacing': [
      2,
      {
        before: true,
        after: true,
      },
    ],
    'comma-spacing': [
      2,
      {
        before: false,
        after: true,
      },
    ],
    'keyword-spacing': [
      2,
      {
        before: true,
        after: true,
      },
    ],
    'no-unused-vars': [1, { destructuredArrayIgnorePattern: '^_' }],
    'unused-imports/no-unused-vars': [0, { argsIgnorePattern: '^_' }],
  },
})
